Type
widget
Summary
A PDF widget
Description
This widget uses the PDFium library to render PDF pages
// Copyright 2014 PDFium Authors. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Compatibility and Support
OS
mac
windows
linux
ios
android
Platforms
desktop
server
mobile
Children Properties
Message
Name | Summary | Syntax |
---|---|---|
pageChanged | Sent when the displayed page is changed by user action | pageChanged <pPage>, <pPreviousPage> |
scrollbarDrag | Sent when the scroll is changed by user action | scrollbarDrag <hScroll>, <vScroll> |
zoomChanged | Sent when the zoom is changed by user action | zoomChanged <pZoom> |
linkClicked | Sent when the user clicks on a link annotation | linkClicked <pAction> |
imageClicked | Sent when the user clicks on an image | imageClicked |
selectionChanged | Sent when the user selects text. | selectionChanged <pRange> |
Property
Name | Summary | Syntax |
---|---|---|
currentPage | Set the visible page of the PDF document | get the currentPage of <widget> set the currentPage of <widget> to <pageNumber> |
pageRect | The left,top,right,bottom rect of the current page relative to the card | get the pageRect of <widget> set the pageRect of <widget> to <rect> |
pageBorderWidth | The width of the border to draw around each page | get the pageBorderWidth of <widget> set the pageBorderWidth of <widget> to <pixels> |
hilitedRange | Get and set the currently selected range of text. | : get the hilitedRange of <widget> set the hilitedRange of <widget> to <pRange> |
borderWidth | The width of the border to draw | get the borderWidth of <widget> set the borderWidth of <widget> to <pixels> |
clickedImage | Get the image data of the image that was clicked on | : get the clickedImage of <widget> |
lockZoom | Locks zoom via user interaction | : get the lockZoom of <widget> Syntax: set the lockZoom of <widget> to {true | false} |
pageDisplay | The mode of page display | get the pageDisplay of <widget> set the pageDisplay of <widget> to <pageDisplay> |
zoom | The zoom of the PDF | get the zoom of <widget> set the zoom of <widget> to <zoom> |
documentOpenAction | Get the action that should be run when opening the document | get the documentOpenAction of <widget> |
pageLocation | The x,y location of the current page relative to the card | get the pageLocation of <widget> set the pageLocation of <widget> to <location> |
flipPages | Use a page flip animation instead of slide | get the flipPages of <widget> set the flipPages of <widget> to { true | false } |
password | The password used to read password protected PDF document | get the password of <widget> set the password of <widget> to <password> |
pageBackColor | The color of the page back during a page flip | get the pageBackColor of <widget> set the pageBackColor of <widget> to <color> |
formattedRect | The formatted rect of the widget | get the formattedRect of <widget> |
pageGravity | The gravity of the page | get the pageGravity of <widget> set the pageGravity of <widget> to { "topLeft", "center" } |
currentDestination | Go to a destination | get the currentDestination of <widget> set the currentDestination of <widget> to { <destinationArray> | <destinationName> } |
hScrollbar | Whether to draw the horizontal scrollbar | get the hScrollbar of <widget> set the hScrollbar of <widget> to {true | false} |
autoHilight | Allow text selection changes via user interaction | : get the autoHilight of <widget> set the autoHilight of <widget> to {true | false} |
showBorder | Whether to draw the border | get the showBorder of <widget> set the showBorder of <widget> to {true | false} |
pageBorderColor | The color of the page border | get the pageBorderColor of <widget> set the pageBorderColor of <widget> to <color> |
lockScroll | Locks scrolling via user interaction | : get the lockScroll of <widget> set the lockScroll of <widget> to {true | false} |
showPageBorder | Whether to draw the page border | get the showPageBorder of <widget> set the showPageBorder of <widget> to {true | false} |
fileName | The file path to a PDF document | get the fileName of <widget> set the fileName of <widget> to <fileData> |
documentMetadata | Get an array detailing the metadata of the document | get the documentMetadata of <widget> |
fileData | The binary file data of a PDF document | get the fileData of <widget> set the fileData of <widget> to <fileData> |
pagePadding | The width of the padding around each page | get the pagePadding of <widget> set the pagePadding of <widget> to <pixels> |
opaque | Whether the background of the widget is filled | get the opaque of <widget> set the opaque of <widget> to {true | false} |
scroll | Set the vertical scroll of the widget | get the scroll of <widget> set the scroll of <widget> to <pixels> |
documentPages | Get an array detailing the pages in the document | get the documentPages of <widget> |
hilitedRangeText | Get the currently selected text. | : get the hilitedRangeText of <widget> |
linkStyles | An array of styles to apply to links | get the linkStyles of <widget> set the linkStyles of <widget> to <array> |
pageColor | The color of the area the page is drawn on. | get the pageColor of <widget> set the pageColor of <widget> to <color> |
hScroll | Set the horizontal scroll of the widget | get the hScroll of <widget> set the hScroll of <widget> to <pixels> |
preserveTransparency | Preserve the transparency of pdf pages by not filling the pageColor | get the preserveTransparency of <widget> set the preserveTransparency of <widget> to { true | false } |
lockPage | Locks page changes via user interaction | : get the lockPage of <widget> set the lockPage of <widget> to {true | false} |
drawAnnotations | Whether annotations are drawn on the PDF | get the drawAnnotations of <widget> set the drawAnnotations of <widget> to {true | false} |
threeD | Whether to draw the border three D | get the threeD of <widget> set the threeD of <widget> to {true | false} |
documentViewerPreferences | Get an array detailing the viewer preferences of the document | get the documentViewerPreferences of <widget> |
vScrollbar | Whether to draw the vertial scrollbar | get the vScrollbar of <widget> set the vScrollbar of <widget> to {true | false} |
documentNamedDestinations | Get an array detailing the named destinations in the document | get the documentNamedDestinations of <widget> |
numberOfPages | The number of pages in the loaded document | get the numberOfPages of <widget> |
documentBookmarks | Get an array detailing the bookmarks in the document | get the documentBookmarks of <widget> |